﻿using UnityEngine;
using System.Collections;

public class PlayBTN : MonoBehaviour
{

		public bool haveBestScore = false;
		public GUIStyle font;
		// Use this for initialization
		void Start ()
		{
		this.font.fontSize = 40;
		this.font.normal.textColor = Color.red;
				if (PlayerPrefs.GetFloat ("Best Time") > 0)
						this.haveBestScore = true;
	
		}

		void OnGUI ()
		{
				if (this.haveBestScore)
						GUI.Label (new Rect (120, 230, 100, 20), "Best: " + PlayerPrefs.GetFloat ("Best Time").ToString ("F2"), font);
		}
		// Update is called once per frame
		void Update ()
		{
	
		}

		void OnMouseDown ()
		{
				Application.LoadLevel (1);
		}
}
